#
# build example and install to prefix/bin directory if needed
#

unset(COMPONENT_LIBRARY)
if(${BUILD_SHARED_LIBS} STREQUAL "ON")
    set(COMPONENT_LIBRARY ${COMPONENT_NAME})
else()
    set(COMPONENT_LIBRARY ${COMPONENT_NAME}_static)
endif()

add_executable(bit_example bit_example.c)
target_link_libraries(bit_example ${COMPONENT_LIBRARY})
install(FILES bit_example.c DESTINATION example/${PROJECT_NAME})

add_executable(convert_eg convert_eg.c)
target_link_libraries(convert_eg ${COMPONENT_LIBRARY})
install(FILES convert_eg.c DESTINATION example/${PROJECT_NAME})

add_executable(compare_eg compare_eg.c)
target_link_libraries(compare_eg ${COMPONENT_LIBRARY})
install(FILES compare_eg.c DESTINATION example/${PROJECT_NAME})
